package ua.eug.tst2;

import java.util.Random;

import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.utils.Disposable;

public class AssetLoad implements Disposable {

	public static AssetManager assets = new AssetManager();
	public static final Random random = new Random();
	public static TextureAtlas myAtlas;
	final String TextureName = "chips.atlas";
	
	public AssetLoad () {
    	assets.load(TextureName, TextureAtlas.class);
    	assets.finishLoading();
    	myAtlas = assets.get(TextureName, TextureAtlas.class);
	}
	
	@Override
	public void dispose() {
		assets.dispose();
		
	}

	public static TextureRegion findRegion(String name) {
		return myAtlas.findRegion(name);
	}

}
